吾本虚无的第一篇博客
历时两天,步步验证,自己总算基本搭好了自己的博客,吾本也是个喜欢记录的人,也曾找过很多博客平台,最终也都不胜人意,倒不如自己搭建一个,大二夏季学期,本学期搞了比赛项目接触了Python语言,自己也很用心去学习,所以看教程的时候依然可以坚持下去,这也是学习的乐趣,本文没有自己的思路吧,就当熟悉一下markdown编辑器和如何发文。
- 下载了Atom markdown来编辑
- 总的说,不走就是,hexo server– hexo clean– hexo –generate –hexo deploy
- 人生苦短,我用自建Blog
- 存在即是虚无
你应该看出我是Iron man迷~自己也不会设计什么Logo之类的,那么就找Iron man自己搞成这样子
码一下自己写的,测试一下:
1 | #绘制表格 |
这个用海龟写的,把屏幕切块1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 24 13:41:08 2018
@author:吾本虚无
"""
import turtle as t
print("依次输入w,h,c,r,并以','隔开")
w,h,c,r=map(int,input().split(','))
print("窗体长%d,高%d,分割为行%d,列%d"%(w,h,c,r))
u=v=0
t.setup(w,h)
t.reset()
t.screensize(w,h,"white")
t.clear()
t.speed(10)
kuang=h/c
chang=w/r
#坐标系转换
x=u-w/2
y=v+h/2
def x_h(u):
return(u-w/2)
def y_h(v):
return(v+h/2)
def huaheng(x,y):
t.penup()
t.goto(x,y)
t.pendown()
t.forward(w)
t.penup()
pass
def huashu(x,y):
t.penup()
t.goto(x,y)
t.pendown()
t.right(90)
t.forward(h)
t.left(90)
t.penup()
'''
huaheng(x_h(0),y_h(0)-kuang)
huashu(x_h(0)+chang,y_h(0))
'''
for i in range(0,c-1):
x=x_h(0)
y=y-kuang
huaheng(x,y)
for j in range(0,r-1):
x=x+chang
y=y_h(0)
huashu(x,y)
总结
作为入门程序员,Python折腾者,搞一下自己的Blog非常有挑战趣味和成就感!
毕竟佛系人生也要找找自己的乐趣